<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,minimum-scale=1, user-scalable=no">
  <title>解构赋值</title>
  <link rel="shortcut icon" href="../img/logo.png" type="image/x-icon"/>
  <script>
    //map集合
    let map = new Map()
    console.log(map)
    //可以存放数据
    map.set('cn', 'China')
    map.set('usa', 'America')

    //China
    console.log(map.get('cn'))
    //America
    console.log(map.get('usa'))

    //for-of：遍历数组
    for (let [key, value] of map) {
      //cn:China
      //usa:America
      console.log(key + ':' + value)
    }
  </script>
</head>
<body>
</body>
</html>
